//
//  SpellSVController.h
//  This file is part of D&D Manager
//
//  Created by Matthew Hutton on 24/05/2006.
//
//
//D&D Manager, a D&D Character and battle management program.
//Copyright (C) 2007, Matthew Hutton
//
//This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License along with this program; if not, write to:
//The Free Software Foundation, Inc.,
//51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
/* SpellSVController */
//Controller for the spell's view for creating and modifying spells.

//file has methods in alphabetical order, rather than grouped by topic, to see if that makes them easier to find.
#import <Cocoa/Cocoa.h>
#import "DivineArcaneOrDomain.h"
#import "DivineArcaneOrDomain2.h"
#import "MaxSpellLevel.h"
#import "MinSpellLevel.h"
#import "CharacterClassController.h"

@interface SpellSVController : NSObject
{
	IBOutlet NSButton *addClassButton;
	IBOutlet NSWindow *addClassSheet;
	IBOutlet NSPopUpButton *areaType;
	IBOutlet NSTextField *areaOfEffectLabel;
	IBOutlet NSButton *attackRollRequired;
	NSMutableArray *availableSpellClasses;
	IBOutlet NSPopUpButton *castingTimePUB;
	IBOutlet NSTextField *castingTimeCustom;
	CharacterClassController *ccController;
	IBOutlet NSArrayController *classController;
	IBOutlet NSTableView *classTable;
	IBOutlet NSPopUpButton *characterTypeAffected;
	IBOutlet NSButton *continueButton;
	IBOutlet NSTextField *customXPBox;
	IBOutlet NSTabView *damageOrFeatOrNeither;
	IBOutlet NSWindow *damageSheet;
	IBOutlet NSView *damageView;
	DivineArcaneOrDomain *divArcOrDom;
	DivineArcaneOrDomain2 *divArcOrDomTwo;
	IBOutlet NSWindow *durationSheet;
	IBOutlet NSButton *maxConcCheck;
	IBOutlet NSButton *permanentCheck;
	IBOutlet NSButton *instantaneousCheck;
	IBOutlet NSTextField *maxConcTF;
	IBOutlet NSButton *exitButton;
	IBOutlet NSWindow *featSheet;
	IBOutlet NSView *featView;
	IBOutlet NSView *healingView;
	IBOutlet NSView *mainView;
	NSTabView *mainTabView;
	NSWindow *mainWindow;
	MaxSpellLevel *maxSL;
	MinSpellLevel *minSL;
	NSManagedObjectContext *mObjC;
	IBOutlet NSView *neitherView;
	IBOutlet NSWindow *noOfAttacksSheet;
	IBOutlet NSButton *paralysesTargets;
	IBOutlet NSWindow *rangeSheet;
	IBOutlet NSButton *returnToCharacterScreen;
	IBOutlet NSPopUpButton *saveEffect;
	IBOutlet NSPopUpButton *saveType;
	/*IBOutlet NSPopUpButton *spellAbilDie1;
	IBOutlet NSPopUpButton *spellAbilDie2;
	IBOutlet NSPopUpButton *spellAbilDie3;
	IBOutlet NSPopUpButton *spellAbilDie4;*/
	IBOutlet NSPopUpButton *spellAbilFixed1;
	IBOutlet NSPopUpButton *spellAbilFixed2;
	IBOutlet NSPopUpButton *spellAbilFixed3;
	IBOutlet NSPopUpButton *spellAbilFixed4;
	IBOutlet NSPopUpButton *spellAbilKey1;
	IBOutlet NSPopUpButton *spellAbilKey2;
	IBOutlet NSPopUpButton *spellAbilKey3;
	IBOutlet NSPopUpButton *spellAbilKey4;
	IBOutlet NSPopUpButton *spellAffects;
	IBOutlet NSArrayController *spellClassController;
	IBOutlet NSArrayController *spellController;
	IBOutlet NSButton *spellResistance;
	IBOutlet NSTableView *spellTable;
	IBOutlet NSPopUpButton *spellType;
	IBOutlet NSButton *targetsChangeEachRound;
	IBOutlet NSButton *xp;
	//character classes.
	IBOutlet NSWindow *characterClassWindow;
	IBOutlet NSTabView *characterClassTV;
}
-(IBAction)addSpellClass:(id)sender;
-(IBAction)addNewSpell:(id)sender;
-(IBAction)areaTypeChanged:(id)sender;
-(void)attachMainViewToTabViewItem:(NSTabViewItem *)tvi;
-(IBAction)castingTimeChanged:(id)sender;
-(void)characterClassSheetDidEnd:(NSWindow *)sheet
					  returnCode:(int)returnCode
					 contextInfo:(void *)contextInfo;
-(IBAction)characterMagicScreen:(id)sender;
-(IBAction)closeAddClassSheet:(id)sender;
-(IBAction)closeCharacterClassSheet:(id)sender;
-(IBAction)closeDamageBox:(id)sender;
-(IBAction)closeDurationBox:(id)sender;
-(IBAction)closeFeatBox:(id)sender;
-(IBAction)closeNoOfAttacksBox:(id)sender;
-(IBAction)closeRangeBox:(id)sender;
-(IBAction)continueBattle:(id)sender;
-(IBAction)displayAddSpellClassSheet:(id)sender;
-(IBAction)displayDamageBox:(id)sender;
-(IBAction)displayDurationBox:(id)sender;
-(IBAction)displayFeatBox:(id)sender;
-(IBAction)displayNoOfAttacksBox:(id)sender;
-(IBAction)displayRangeBox:(id)sender;
-(IBAction)durInstantaneousOrPermanentChanged:(id)sender;
-(IBAction)editDomainChoices:(id)sender;
-(IBAction)editCharacterClassChoices:(id)sender;
-(IBAction)exitBattle:(id)sender;
-(IBAction)instantaneousOrPermanentOff:(id)sender;
-(NSManagedObjectContext *)managedObjectContext;
-(IBAction)savingThrowTypeChanged:(id)sender;
-(void)setupBattleButtons:(BOOL)nowAreOn;
-(void)setupSpellSubTypeForSpell:(NSManagedObject *)spell;
-(IBAction)showRollDiceScreen:(id)sender;
-(IBAction)showImportSpellsScreen:(id)sender;
-(IBAction)spellAbilityChosen:(id)sender;
-(IBAction)spellAffectsChanged:(id)sender;
-(IBAction)spellSubtypeChanged:(id)sender;
-(IBAction)spellTypeChanged:(id)sender;
-(void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem;
-(void)tableViewSelectionDidChange:(NSNotification *)notification;
-(IBAction)xpPressed:(id)sender;
@end
